package com.ocm.shop.feign;

import com.ocm.core.launch.constant.AppConstant;
import com.ocm.core.tool.api.R;
import com.ocm.shop.entity.Shop;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author hqy
 */
@FeignClient(
	value = AppConstant.APPLICATION_SHOP_NAME,
	fallback = IShopClientFallback.class
)
public interface IShopClient {

	String API_PREFIX = "/f/shop";

	/**
	 * 根据id获取店铺信息
	 * @param shopId id
	 * @return 店铺信息
	 */
	@GetMapping(API_PREFIX+"/shop-info-by-id")
	R<Shop> shopInfo(@RequestParam("shopId") Long shopId);
}
